#ifndef _RMSDIRECTX_H_
#define _RMSDIRECTX_H_

#include <ddraw.h>

// frame sizes
#define FS_FULLSCREEN				0
#define FS_320x240					1
#define FS_640x480					2
#define FS_720x480					3
#define FS_160x120					4

extern bool bRMSDirectYUVDraw;

void InitDirectXGlobals();
BOOL InitDDraw(HWND hwnd, int W, int H, DWORD fs);
void ClipTableInit();

void CloseDDraw();

BOOL CheckSurface();

UINT RMSDirectYUV(HWND hwnd,
				  BYTE* Y, 
				  BYTE* U,
				  BYTE* V,
				  int W,int H,
				  int pitch,
				  int addField);

UINT RMSDirectRGB(HWND hwnd,
				  BYTE* Y, 
				  BYTE* U,
				  BYTE* V,
				  int W,int H,
				  int pitch,
				  int addField);

void YUVToRGB(	  BYTE* pDst,
				  BYTE* Y, 
				  BYTE* U,
				  BYTE* V,
				  int W,int H,
				  int pitch);

HRESULT OnPaintDX(HWND hwnd, int W, int H, DWORD fs);

#endif